package text;

import java.util.Scanner;

public class Text1 {

    public static void main(String[] args) {
        Thread main=Thread.currentThread();
        System.out.println(main);
        Thread t = new Thread() {
            public void run() {
                Scanner scanner = new Scanner(System.in);
                System.out.println("输入一个数");
                for (int num = scanner.nextInt(); num > 0; num--) {
                    System.out.println(num);
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
                System.out.println("时间到");
            }
        };
        t.start();
    }
}
